/**
 * 依赖aServer.js, log.js
 */
var loginServer = mui.extend(aServer || {}, {
	isDebug: true,

	/**
	 * 登录功能
	 * @param {Object} userName
	 * @param {Object} password
	 * @param {Object} success
	 * @param {Object} error
	 */
	login: function(phone,verifyCode,smsId,success, error) {
		var data = {};
		var url  = "/api/oauth"+"?phone="+phone +"&verifyCode="+verifyCode +"&smsId="+smsId;
		aServer.executeActionOfServerNoToken(this.isDebug, url, "登录失败", data, success, error);
	},

	sendSmsCode: function(phone, success, error) {
		var data = {
			"phone": phone,
		}
		aServer.executeActionOfServerGetNoToken(this.isDebug, "/api/smscode", "获取验证码失败", data, success, error);
	},
	
	register:function(phone,username,company,department,success, error){
		var data = {
			"id":"12",
			"phone": phone,
			"username": username,
			"company": company,
			"department": department,
		}
		aServer.executeActionOfServerGetRegister(this.isDebug, "http://47.95.253.34:9999/scho/id", "用户注册失败", data, success, error);
	}
});
